home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / oji / jvmmgr.h next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  3.9 KB  |  145 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #ifndef jvmmgr_h___
  39. #define jvmmgr_h___
  40.  
  41. #include "prtypes.h"
  42. #include "jni.h"
  43. #include "jsdbgapi.h"
  44. #include "nsError.h"
  45.  
  46. #include "nsISecurityContext.h"
  47.  
  48. struct nsJVMManager;
  49.  
  50. typedef enum nsJVMStatus {
  51.     nsJVMStatus_Enabled,  /* but not Running */
  52.     nsJVMStatus_Disabled, /* explicitly disabled */
  53.     nsJVMStatus_Running,  /* enabled and started */
  54.     nsJVMStatus_Failed    /* enabled but failed to start */
  55. } nsJVMStatus;
  56.  
  57.  
  58. /*******************************************************************************
  59.  * Interface for C Clients
  60.  ******************************************************************************/
  61.  
  62. PR_BEGIN_EXTERN_C
  63.  
  64. PR_EXTERN(void)
  65. JVM_ReleaseJVMMgr(struct nsJVMManager* mgr);
  66.  
  67. PR_EXTERN(nsJVMStatus)
  68. JVM_StartupJVM(void);
  69.  
  70. PR_EXTERN(nsJVMStatus)
  71. JVM_ShutdownJVM(void);
  72.  
  73. PR_EXTERN(nsJVMStatus)
  74. JVM_GetJVMStatus(void);
  75.  
  76. PR_EXTERN(PRBool)
  77. JVM_AddToClassPath(const char* dirPath);
  78.  
  79. PR_EXTERN(void)
  80. JVM_ShowConsole(void);
  81.  
  82. PR_EXTERN(void)
  83. JVM_HideConsole(void);
  84.  
  85. PR_EXTERN(PRBool)
  86. JVM_IsConsoleVisible(void);
  87.  
  88. PR_EXTERN(void)
  89. JVM_PrintToConsole(const char* msg);
  90.  
  91. PR_EXTERN(void)
  92. JVM_ShowPrefsWindow(void);
  93.  
  94. PR_EXTERN(void)
  95. JVM_HidePrefsWindow(void);
  96.  
  97. PR_EXTERN(PRBool)
  98. JVM_IsPrefsWindowVisible(void);
  99.  
  100. PR_EXTERN(void)
  101. JVM_StartDebugger(void);
  102.  
  103. PR_EXTERN(JNIEnv*)
  104. JVM_GetJNIEnv(void);
  105.  
  106. PR_IMPLEMENT(void)
  107. JVM_ReleaseJNIEnv(JNIEnv *pJNIEnv);
  108.  
  109. PR_EXTERN(nsresult)
  110. JVM_SpendTime(PRUint32 timeMillis);
  111.  
  112. PR_EXTERN(PRBool)
  113. JVM_MaybeStartupLiveConnect(void);
  114.  
  115. PR_EXTERN(PRBool)
  116. JVM_MaybeShutdownLiveConnect(void);
  117.  
  118. PR_EXTERN(PRBool)
  119. JVM_IsLiveConnectEnabled(void);
  120.  
  121. PR_EXTERN(nsJVMStatus)
  122. JVM_ShutdownJVM(void);
  123.  
  124. PR_EXTERN(PRBool)
  125. JVM_NSISecurityContextImplies(JSStackFrame  *pCurrentFrame, const char* target, const char* action);
  126.  
  127. PR_EXTERN(JSPrincipals*)
  128. JVM_GetJavaPrincipalsFromStack(JSStackFrame  *pCurrentFrame);
  129.  
  130. PR_EXTERN(void *)
  131. JVM_GetJavaPrincipalsFromStackAsNSVector(JSStackFrame  *pCurrentFrame);
  132.  
  133. PR_EXTERN(JSStackFrame**)
  134. JVM_GetStartJSFrameFromParallelStack(void);
  135.  
  136. PR_EXTERN(JSStackFrame*)
  137. JVM_GetEndJSFrameFromParallelStack(JSStackFrame  *pCurrentFrame);
  138.  
  139. PR_EXTERN(nsISecurityContext*) 
  140. JVM_GetJSSecurityContext();
  141.  
  142. PR_END_EXTERN_C
  143.  
  144. #endif /* jvmmgr_h___ */
  145.